package com.core.framework.web;

import java.util.Properties;

import com.core.framework.tools.PropertiesLoader;
/**
 * 获取 easy.properties 资源信息
 * @author 刘涛
 * @since Jun 27, 2012
 */
public class EasyResource {
	private static String propertierName ="easy.properties" ;
	static final Properties p = PropertiesLoader.getProperties(propertierName);
	public static String getProString(String key)
	{
			return PropertiesLoader.getStringProperty(p, key, "");
	}
	public static String getProString(String key,String defaultValue)
	{
			return PropertiesLoader.getStringProperty(p, key, defaultValue);
	}
	public static Integer getProInteger(String key )
	{	
			return PropertiesLoader.getIntegerProperty(p, key, 0);
	}
	public static Integer getProInteger(String key , Integer defaultValue )
	{	
			return PropertiesLoader.getIntegerProperty(p, key, defaultValue);
	}
	public static boolean getProBoolean(String key )
	{
		return PropertiesLoader.getBooleanProperty(p, key, true);
	}
	public static boolean getProBoolean(String key , boolean defaultValue)
	{
		return PropertiesLoader.getBooleanProperty(p, key, defaultValue);
	}
}
